package com.demo.cxf.server;

public class UserServiceImpl implements IUserService {
    public String getName(Long userId) {
        if (userId == 1) {
            return "张三";
        }else if (userId == 2) {
            return "李四";
        }
        return "没有这个人";
    }

    public UserBean getUser(Long userId) {
        UserBean userBean = new UserBean();
        if (userId==1){
            userBean.setUserId(userId);
            userBean.setName("张三");
            userBean.setAge(10);
        } else if (userId == 2){
            userBean.setUserId(userId);
            userBean.setAge(20);
            userBean.setName("李四");
        }
        return userBean;
    }
}
